import request from '../utils/request.js'

export const courseGet = async ()=>{
	let res = await request.get('/classes/LearnArticle')
	return res
}

export const cakeBatch = (cakelist)=>{  //批量转存数据
	let requests = cakelist.map(item=>{
		return {
			path:'/1.1/classes/CakeList',
			method:'POST',
			body:item
		}
	})
	return request.post('/batch',{requests})
}

export const cakeGet = (bcid=1,page=0)=>{
	let skip = page * 8
	return request.get(`/classes/CakeList?where={"bcid":${bcid}}&limit=8&skip=${skip}`)
}